home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / RxMUI / Examples / listjump.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-05-24  |  3.6 KB  |  134 lines

  1. /**/
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  7. if AddLibrary("rxmui.library")~=0 then exit
  8.  
  9. call rxmuiopt("showerr debugmode")
  10. call setrxmuistack(24000)
  11.  
  12. call CreateApp
  13. call set("lv0","active",50)
  14. call handleApp
  15.  
  16. /***********************************************************************/
  17. CreateApp: procedure
  18.  
  19.     do i=0 to 100
  20.         entries.i="Entry" i
  21.     end
  22.  
  23.     app.Title="Example"
  24.     app.Version="$VER: Example 1.0 (20.12.00)"
  25.     app.Copyright="©2000, alfie"
  26.     app.Author="alfie"
  27.     app.Description="Just a little example"
  28.     app.Base="EXAMPLE"
  29.     app.Subwindow="Win"
  30.  
  31.      win.ID="MAIN"
  32.      win.Title="Example"
  33.      win.Contents="MGROUP"
  34.  
  35.       mgroup.0="hg"
  36.         hg.class="group"
  37.         hg.horiz=1
  38.  
  39.          hg.0="lister"
  40.           lister.class="listview"
  41.           lister.FixWidthTxT="123456789012345"
  42.           lister.list="list"
  43.            list.frame="inputlist"
  44.            list.active=0
  45.             list.0="Page 1"
  46.             list.1="Page 2"
  47.  
  48.          hg.1="pager"
  49.           pager.class="group"
  50.           pager.pagemode=1
  51.  
  52.            pager.0="page0"
  53.             page0.class="group"
  54.             page0.frame="readlist"
  55.             page0.frametitle=list.0
  56.              page0.0="lv0"
  57.               lv0.class="listview"
  58.               lv0.list="list0"
  59.                list0.frame="inputlist"
  60.                list0.list="entries"
  61.  
  62.            pager.1="page1"
  63.             page1.class="group"
  64.             page1.frame="readlist"
  65.             page1.frametitle=list.1
  66.              page1.0="lv1"
  67.               lv1.class="listview"
  68.               lv1.list="list1"
  69.                list1.frame="inputlist"
  70.                list1.list="entries"
  71.  
  72.       mgroup.1="bg"
  73.        bg.class="group"
  74.        bg.columns=5
  75.        bg.simesize=1
  76.         bg.0=button("Active","_Active")
  77.         bg.1=button("Top","_Top")
  78.         bg.2=button("Bottom","_Bottom")
  79.         bg.3=button("up","_Up")
  80.         bg.4=button("down","_Down")
  81.  
  82.     res=NewObj("application","app")
  83.     if res~=0 then exit
  84.  
  85.     call Notify("win","closerequest",1,"app","returnid","quit")
  86.  
  87.     call Notify("lister","active","everytime","pager","set","activepage","triggervalue")
  88.  
  89.     call Notify("lv0","active","everytime","lv1","set","active","triggervalue")
  90.     call Notify("lv1","active","everytime","lv0","set","active","triggervalue")
  91.  
  92.     call Notify("active","pressed",0,"lv0","jump","active")
  93.     call Notify("active","pressed",0,"lv1","jump","active")
  94.  
  95.     call Notify("Top","pressed",0,"lv0","jump","top")
  96.     call Notify("Top","pressed",0,"lv1","jump","top")
  97.  
  98.     call Notify("Bottom","pressed",0,"lv0","jump","Bottom")
  99.     call Notify("Bottom","pressed",0,"lv1","jump","Bottom")
  100.  
  101.     call Notify("Up","pressed",0,"lv0","jump","Up")
  102.     call Notify("Up","pressed",0,"lv1","jump","Up")
  103.  
  104.     call Notify("Down","pressed",0,"lv0","jump","Down")
  105.     call Notify("Down","pressed",0,"lv1","jump","Down")
  106.  
  107.     call Notify("pager","activepage","everytime","lv0","jump","active")
  108.     call Notify("pager","activepage","everytime","lv1","jump","active")
  109.  
  110.     call set("win","open",1)
  111.     call getattr("win","open","o")
  112.     if o=0 then do
  113.         say "can't open window"
  114.         exit
  115.     end
  116.  
  117.     return
  118. /**************************************************************************/
  119. handleApp: procedure
  120.     ctrl_c=2**12
  121.     do forever
  122.         call newhandle("APP","H",ctrl_c)
  123.         if and(h.signals,ctrl_c)>0 then exit
  124.         select
  125.             when h.event="QUIT" then exit
  126.             otherwise say h.event
  127.         end
  128.     end
  129. /***********************************************************************/
  130. halt:
  131. break_c:
  132.     exit
  133. /**************************************************************************/
  134.